package cn.ctodb.im.dto;

import cn.ctodb.im.proto.Message;

/**
 * All rights Reserved, Designed By www.ctodb.cn
 *
 * @version V1.0
 * @author: lichaohn@163.com
 * @date: 2018-11-12 17:04
 * @Copyright: 2018 www.ctodb.cn All rights reserved.
 */
public class MessageTextReqDTO extends AbstractMessageDTO<Message.TextReq> {

    private String content = ""; // 内容

    @Override
    public void fromProto(Message.TextReq textReq) {
        fromProtoBaseInfo(textReq.getBaseInfo());
        setContent(textReq.getContent());
    }

    @Override
    public Message.TextReq toProto() {
        return Message.TextReq.newBuilder().setBaseInfo(toProtoBaseInfo()).setContent(getContent()).build();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
